package com.audio.controller;

import com.audio.service.impl.FileServiceImpl;
import com.audio.utils.ForgedDetectionUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("test")
public class TestController {

    @PostMapping("/file")
    public String file(MultipartFile file){
        System.out.println(file.isEmpty());
        FileServiceImpl.saveFile(file);
        return file.isEmpty() ? "文件为空" : "文件上传成功";
    }
}
